package com.jianzhile.jobs.bean;

import java.io.Serializable;

/**
 * 相册item 实体类
 * 
 */
public class BucketEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String bucketId;
	private String bucketName;
	// 相册缩略图，取该buketId对应的一张图即可
	private String previewPath;

	public String getPreviewPath() {
		return previewPath;
	}

	public void setPreviewPath(String previewPath) {
		this.previewPath = previewPath;
	}

	public String getBucketId() {
		return bucketId;
	}

	public void setBucketId(String bucketId) {
		this.bucketId = bucketId;
	}

	public String getBucketName() {
		return bucketName;
	}

	public void setBucketName(String bucketName) {
		this.bucketName = bucketName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((bucketId == null) ? 0 : bucketId.hashCode());
		result = prime * result
				+ ((bucketName == null) ? 0 : bucketName.hashCode());
		result = prime * result
				+ ((previewPath == null) ? 0 : previewPath.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BucketEntity other = (BucketEntity) obj;
		if (bucketId == null) {
			if (other.bucketId != null)
				return false;
		} else if (!bucketId.equals(other.bucketId))
			return false;
		if (bucketName == null) {
			if (other.bucketName != null)
				return false;
		} else if (!bucketName.equals(other.bucketName))
			return false;
		if (previewPath == null) {
			if (other.previewPath != null)
				return false;
		} else if (!previewPath.equals(other.previewPath))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "BucketEntity [bucketId=" + bucketId + ", bucketName="
				+ bucketName + ", previewPath=" + previewPath + "]";
	}

}
